#!/bin/sh

. /etc/rc.common

##
# Start up radmind server
##

if [ -f /opt/local/var/radmind/client/.DoNotRadmind ]; then
	exit 0
fi

if [ -f /opt/local/var/radmind/client/.RadmindRunning ]; then

    CheckForNetwork

    if [ "${NETWORKUP}" = "-NO-" ]; then exit; fi

    ConsoleMessage "Starting Radmind Update"

    if [ -f /etc/hooks/radmind.hook -a \
		-x /etc/hooks/radmind.hook ]; then
	/etc/hooks/radmind.hook | while read line; do
	    if ! expr "$line" : \\% > /dev/null; then
		ConsoleMessage "$line"
	    fi
	done
    fi
fi
